<?php
$rest = substr("abcdef", 0, -1);  // returns "abcde"
echo $rest."<br />";
$rest = substr("abcdef", 2, -1);  // returns "cde"
echo $rest."<br />";
$rest = substr("abcdef", 4, -4);  // returns false
echo $rest."<br />";
$rest = substr("abcdef", -4, -1); // returns "de"
echo $rest."<br />";
$rest = substr("abcdef", 0, 3); // returns "de"
echo $rest."<br />";
?>
